/**
 * @Company:中享思途   
 * @Title:OrderManagerController.java 
 * @Author:IL Clown   
 * @Date:2020年9月1日 上午9:15:40     
 */
package com.situ.shopsystem.controller;

import java.io.Serializable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.situ.shopsystem.pojo.LayuiResult;
import com.situ.shopsystem.pojo.Order;
import com.situ.shopsystem.service.OrderService;

/** 
 * @ClassName:OrderManagerController 
 * @Description:(这里用一句话描述这个类的作用)  
 * 
 * 
 * 
 * manager/order/findAllOrder
 * manager/order/changeState
 * manager/order/
 *
 * 
 * 
 * 
 * 
 * 
 */
@Controller
@RequestMapping("/manager/order/")
public class OrderManagerController implements Serializable {
	private static final long serialVersionUID = 1L;
	@Autowired
	private OrderService orderService;

	@RequestMapping("goOrderIndex")
	public String goOrderIndex() {
		return "manager/order/order_index";
	}

	@ResponseBody
	@RequestMapping("findAllOrder")
	public LayuiResult findAllOrder(Order order, Integer page, Integer limit) {
		LayuiResult order2 = orderService.findAll(page, limit);
		return order2;
	}

	@ResponseBody
	@RequestMapping("changeState")
	public int changeState(Long rowId) {
		orderService.updateState(rowId);
		return 1;
	}

}
